1. Field of the Invention
This invention concerns a storage device connected to a host device in which is stored an operating system, and which is connected to and used with a computer, word processor, electronic book, or other information processing device. In particular, this invention concerns a storage device having access protection functions to permit or prohibit writing to or reading from storage media.
2. Description of the Related Art
A storage device connected to the above-mentioned information processing devices may be written with information pertaining to privacy, confidential information concerned with employee duties, or other information which should not be known to persons other than managers or the original owners of the data.
For this reason, hard disk devices, magneto-optical disk devices and the like have a mechanism to perform access restriction (permission) using passwords or other means.
In such a device, the storage media and storage device may for example have a password, and when a password sent from the host device (here corresponding to an information processing device to which an external storage device is connected) does not coincide with this, reading and writing are prohibited.
In a computer or other information processing device using an external storage device, in order to efficiently perform data access of the external storage device, data and directory information on the storage media is buffered in the main storage device (internal storage device).
For example, even if a request to write to the external storage device occurs, it is not executed immediately, but the write data is stored temporarily in the buffer of the main storage device. When a suitable amount of data has accumulated, writing to the external storage device is executed.
Or, directory information for the storage device is read into the main storage device in advance. In response to requests from an application or similar, data updates are performed for data in the buffer. At an appropriate time, processing is performed to write back the buffer data to the storage media.
In such processing, until the storage media is removed from the storage device, the directory information may remain buffered.
Further, in order for an information processing device which uses an external storage device to recognize that the storage media in the external storage device has been replaced, when writing to the storage media is permitted, part of the OS (operating system) may periodically write prescribed data to the storage media.
It is assumed that, in the above-mentioned information processing device, until the storage media is actually removed or is replaced, the state of access restriction for the storage media (reading and writing permitted or prohibited) does not change.
Consequently, in a state in which storage media is used employing a storage device such as described above, when the state of access restrictions (writing permitted or prohibited) changes, a problem may arise.
For example, in an information processing device, when directory and other information is buffered, even if the access restriction state for the storage media is set to permit reading, reading becomes impossible, and even if no data is read from the storage device, directory information stored in the main storage device of the information processing device is displayed.
In this case, even if directory information is displayed, the functions of the storage device are not utilized. Further, in this stage the application software continues its task, so that data may be lost, or inconsistent data may be created.
In the information processing device, in order to check for removal or replacement of the storage media, when the access restriction state is a write-permitted state, and data is periodically written to a certain part, the following problem exists.
Namely, when the access restriction state changes from write-permitted to write-prohibited, this change cannot be detected by the information processing device. Consequently an attempt is made to execute writing at the next timing cycle. In this case, [the access restriction] is set to write-prohibited on the storage device side, so that an error is returned to the OS, and a write error occurs.
On the information processing device side, this error is not expected, so that satisfactory error processing is not performed, and as a result, system stoppage may occur.
Hence an object of this invention is to provide a storage device which resolves this problem of the prior art.
In particular, an object of this invention is to provide a storage device having access protection functions which resolves problems which occur when the actual access permission state in the storage device changes, but this [change] is not correctly transmitted to the host device (the information processing device).
As the basic concept of the access control method in a storage device to achieve the above object of this invention, the method is an access control method of a storage device which performs driving at least for reading of storage media by means of the host device control system, characterized in that, when the state of access permission for the above-mentioned storage media changes without the physical removal of the above-mentioned storage media from the above-mentioned storage device, this change is detected, and the above-mentioned control system is notified that the above-mentioned storage media has been replaced.
A preferred embodiment of the above-mentioned access control method to achieve the objects of the invention is characterized by changes in the above-mentioned access permission state being based on the issue of commands to the above-mentioned storage device by means of a user trigger.
A preferred embodiment of the above-mentioned access control method to achieve the objects of the invention is the access control method of a storage device which performs driving at least for reading of storage media by means of the host device control system, characterized by the reception of prescribed commands from the above-mentioned control system, and by notification of the above-mentioned control system of replacement of the storage media without depending on changes in the state of access permission of the above-mentioned storage media when the next access command is received through the above-mentioned control system.
A preferred embodiment of the above-mentioned access control method to achieve the objects of the invention is characterized by the above-mentioned prescribed commands being commands to change the logic format.
A preferred embodiment of the above-mentioned access control method to achieve the objects of the invention is characterized by changes in the state of access permission of the above-mentioned storage media being performed through the receipt of commands from the access restriction control system.
A preferred embodiment of the above-mentioned access control method to achieve the objects of the invention is characterized by notification of the above-mentioned host device of replacement of the above-mentioned storage media when a password stipulating the access restriction state, sent from the above-mentioned host device, is received.
A storage device which attains the above-mentioned objects of the invention is a storage device with basic configuration such that driving is performed for at least reading of storage media by means of the control system of a host device, and which is characterized by having a storage unit which stores passwords which stipulate the state of restriction of access to the storage media of the above-mentioned storage device; a reception unit which receives commands from the above-mentioned host device; a permission control unit which compares a password received from the above-mentioned host device and a password stored by the above-mentioned storage unit, and, in case of coincidence, permits a change of the access restriction state; and a notification unit which notifies the above-mentioned host device of replacement of the above-mentioned storage media based on changes in the above-mentioned access restriction state.
A preferred embodiment of the above-mentioned storage device to attain the objects of this invention is a storage device which performs driving for at least reading of storage media by means of the control system of a host device, characterized by having a detection unit which detects changes when the access permission state for the above-mentioned storage media changes without the physical removal of the storage media when an access command for the above-mentioned storage media is received from the above-mentioned control system, and a notification unit which notifies the above-mentioned host device when the above-mentioned storage media is replaced.
A preferred embodiment of the above-mentioned storage device to attain the objects of this invention is a storage device which performs driving for at least reading of storage media by means of the control system of a host device, having a reception unit which receives commands from the above-mentioned host device, and a notification unit which, when an access command is next sent via the above-mentioned control system after receiving an access command for the above-mentioned storage media from the above-mentioned control system, notifies the above-mentioned control system of the replacement of storage media, regardless of changes in the state of access permission for the above-mentioned storage media.
A preferred embodiment of the above-mentioned storage device to attain the objects of this invention is a storage device which performs driving for at least reading of storage media by means of the control system of a host device, having a reception unit which receives commands from the above-mentioned host device, and a notification unit which, when a command is next received via the above-mentioned control system after the above-mentioned reception unit receives a prescribed command from the above-mentioned control system to change the logical format of the above-mentioned storage media, notifies the above-mentioned control system of the replacement of the above-mentioned storage media.
The features of this invention will be made clearer by embodiments of the invention, which are explained below with reference to the drawings.